Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XDR definitions to Protocol 14. #366

Merged
merged 10 commits into from
Sep 21, 2020
Merged

Update XDR definitions to Protocol 14. #366

merged 10 commits into from
Sep 21, 2020

Conversation

abuiles
Copy link
Contributor

@abuiles abuiles commented Sep 18, 2020

Regenerate XDR definitions with Protocol 14.

This includes the new operations from CAP23 and CAP33.

The XDR generated in this code includes breaking changes on the internal XDR library since a bug was fixed which was causing incorrect code to be generated (see stellar/xdrgen#52)

The following functions were renamed:

  • xdr.OperationBody.setOption() -> xdr.OperationBody.setOptions()
  • xdr.OperationBody.manageDatum() -> xdr.OperationBody.manageData()
  • xdr.OperationType.setOption() -> xdr.OperationType.setOptions()
  • xdr.OperationType.manageDatum() -> xdr.OperationType.manageData()

@abuiles abuiles marked this pull request as draft September 18, 2020 13:25
@abuiles abuiles marked this pull request as ready for review September 21, 2020 16:36
types/xdr.d.ts Outdated
| 'pathPaymentStrictSend'
| 'createClaimableBalance'
| 'claimClaimableBalance'
| 'beginSponsoringFutureReserf'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh -- this is weird, it should say beingSponsoringFutureReserves -- I'll check what's going on

@@ -235,7 +235,7 @@ export class Operation {
result.destination = encodeMuxedAccountToAddress(attrs);
break;
}
case 'manageDatum': {
case 'manageData': {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem like they'll break old code; is that change documented anywhere? Is there a way to make this backwards-compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morleyzhi People who rely on stellar-base and the helper we expose, won't have any problem since the change is transparent for them.

However, if someone is using the autogenerated code for the XDR library and it's relying on this, it's very likely their code will break. I'll update the changelog to reflect this change.

Copy link
Contributor

@morleyzhi morleyzhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No red flags for me, just one note about potentially preserving backwards compatibility. If we can't, feel free to ship it.

@abuiles abuiles merged commit c09439b into master Sep 21, 2020
@abuiles abuiles deleted the xdr-protocol-14 branch September 21, 2020 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants